package com.cmcc.cmii.smsmail.listener;

import com.cmcc.cmii.smsmail.constants.MailMqConstants;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Thanks
 */
@Component
public class MailSendSuccessListener {


    /**
     * 处理发送成功的邮件
     * @param jsonStr
     */
    @RabbitListener(bindings = @QueueBinding(value = @Queue(value = MailMqConstants.MAIL_SEND_SUCCESS_QUEUE, durable = "true"),
            exchange = @Exchange(value = MailMqConstants.MAIL_SEND_SUCCESS_EXCHANGE,
                    ignoreDeclarationExceptions = "true",
                    type = ExchangeTypes.TOPIC, durable = "true"), key = MailMqConstants.MAIL_SEND_SUCCESS_KEY))
    public void handle(String jsonStr){

    }
}
